/**
 * 报表设计公司(2011)
 */
package com.reportgear.report.context;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Locale;

import net.abbp.report.context.ReportContext;
import net.abbp.report.model.cell.style.FontStyle;


/**
 * 默认值
 * 
 * @version 1.0 2011-3-24
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ANNCSR 2.0
 */
public class DefaultValues {
	private FontStyle fontStyle = null;

	public FontStyle getReportFont() {
		if (this.fontStyle == null) {
			Locale locale = ReportContext.INSTANCE.getLocale();
			if (Locale.SIMPLIFIED_CHINESE.equals(locale)) {
				this.fontStyle = FontStyle.getInstance("SimSun", 0, 12);
			} else if ((Locale.TRADITIONAL_CHINESE.equals(locale)) || (Locale.KOREAN.equals(locale))) {
				this.fontStyle = FontStyle.getInstance("Dialog", 0, 12);
			} else if ((Locale.JAPANESE.equals(locale)) || (Locale.JAPAN.equals(locale))) {
				this.fontStyle = FontStyle.getInstance("MS UI Gothic", 0, 12);
			} else {
				this.fontStyle = FontStyle.getInstance("Times New Roman", 0, 12);
			}
		}

		// TODO 使用原型模式
		return this.fontStyle;
	}

	public void setFRFont(FontStyle font) {
		this.fontStyle = font;
	}
}
